home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / arcers / tarsrc.zip / TARSRC.TAR / tar-1.11.2 / proto.h < prev    next >
C/C++ Source or Header  |  1993-11-15  |  2KB  |  84 lines

  1. /*
  2.   Standard prototype header for switchable prototype support
  3.  
  4.   Define USE_PROTOTYPES if ANSI C style function
  5.   prototypes should be used.
  6.  
  7.   Define DECLARE_PROCEDURES if non-returning functions should
  8.   be declared 'void'
  9.  
  10.   These are defined automatically for C++ and __STDC__
  11.  
  12.   To use prototypes, declare routines as 'type name _P_((args));'
  13.   */
  14. #ifndef __PROTO_H__
  15. #define __PROTO_H__
  16.  
  17. #ifndef USE_PROTOTYPES
  18. #ifdef __cplusplus
  19. #define USE_PROTOTYPES
  20. #endif
  21. #ifdef __STDC__
  22. #define USE_PROTOTYPES
  23. #endif
  24. #ifdef WINDOWSNT
  25. #define USE_PROTOTYPES
  26. #endif
  27. #endif
  28.  
  29. #ifndef DECLARE_PROCEDURES
  30. #ifdef __cplusplus
  31. #define DECLARE_PROCEDURES
  32. #endif
  33. #ifdef __STDC__
  34. #define DECLARE_PROCEDURES
  35. #endif
  36. #ifdef WINDOWSNT
  37. #define DECLARE_PROCEDURES
  38. #endif
  39. #endif
  40.  
  41. #ifdef USE_PROTOTYPES
  42. #define _P_(x) x
  43. #else
  44. #define _P_(x) ()
  45. #endif
  46.  
  47. #ifdef DECLARE_PROCEDURES
  48. #define _VOID_ void
  49. #else
  50. #define _VOID_
  51. #endif
  52.  
  53. /* If using GNU, then support inline function declarations. */
  54. #ifndef INLINE
  55. #ifdef __GNUC__
  56. #define INLINE __inline__
  57. #else
  58. #define INLINE
  59. #endif
  60. #endif
  61.  
  62. /* If you are compiling with a non-C calling convention but need to
  63.    declare vararg routines differently, put it here */
  64. #ifndef _VARARGS_
  65. #ifdef WINDOWSNT
  66. #define _VARARGS_ __cdecl
  67. #else
  68. #define _VARARGS_
  69. #endif
  70. #endif
  71.  
  72. /* If you are providing a function to something that will call the
  73.    function back (like a signal handler and signal(), or main()) its calling
  74.    convention must be whatever standard the libraries expect */
  75. #ifndef _CALLBACK_
  76. #ifdef WINDOWSNT
  77. #define _CALLBACK_ __cdecl
  78. #else
  79. #define _CALLBACK_
  80. #endif
  81. #endif
  82.  
  83. #endif /* __PROTO_H__ */
  84.